#include "udpClient.hpp"
#include <memory>
using namespace Client;

static void Useage(char *ret)
{
    printf("运行失败，请输入后面2个参数,端口，ip%s\n", ret);
}
//./udpClient server_ip server_port
int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        Useage(argv[0]);
        exit(3);
    }

    string server_ip = argv[1];
    uint16_t server_port = atoi(argv[2]);

    unique_ptr<udpClient> ret(new udpClient(server_ip, server_port));
    ret->initClient();
    ret->run();

    return 0;
}